package com.nti56.springboot.utils;



import java.io.InputStream;
import java.util.Properties;

public class PropertiesUtil {
	
	static private Properties dbProps = null;
	static {
		loads();
	}

	synchronized static public void loads() {
		InputStream is = PropertiesUtil.class.getResourceAsStream("remoteSQL.properties");
		dbProps = new Properties();
		try {			
			dbProps.load(is);
            is.close();
		} catch (Exception e) {
			System.err.println("不能读取属性文件. "+ "请确保db.properties在CLASSPATH指定的路径中");
		}
	}

	public static String getProperties(String key) {
		return dbProps.getProperty(key).trim();   
	}
	

}
